﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ruction
{
    public class GameEngine
    {
        #region Member Variables
        /// <summary>
        /// Used to lock access when checking for and creating the instance of Game
        /// </summary>
        private static object mPadLock = new object();

        /// <summary>
        /// Holds the one instantiated Game used through the Instance get accessor
        /// </summary>
        private static GameEngine mInstance = null;

        #endregion Member Variables

        #region Constructor
        /// <summary>
        /// Creates a new instance of Game
        /// </summary>
        /// <remarks>This constructor is private to prevent more than one instance</remarks>
        private GameEngine() { }
        #endregion Constructor

        #region Properties

        #region Instance
        /// <summary>
        /// Get a reference to the instance of Game
        /// </summary>
        public static GameEngine Instance
        {
            get
            {
                lock (mPadLock)
                {
                    if (mInstance == null)
                        mInstance = new GameEngine();
                }
                return mInstance;
            }
        }
        #endregion Instance

        #endregion Properties

        #region Methods

        /// TODO: Add any methods to be  available through the Game instance here

        #endregion Methods
    }
}
